//
// Created by jmdvirus on 2020/3/27 下午5:18.
// Copyright (c) 2020 benewtech All rights reserved.
//
//     ******          *             *--*
//       ||            *             |
//       ||  *--*--*---*  * *-********--*
//   *  //   *  *  *   *\ / ||  |  |    |
//    **    *  *  *---* *  *   *--* *--*
//

#ifndef CUTEDEVICE_CMMEDIAOPERATIONRAW_H
#define CUTEDEVICE_CMMEDIAOPERATIONRAW_H

#include "CMMediaOperationBase.h"
#include "funcs/cm_camera.h"

class CMMediaOperationRaw : public CMMediaOperationBase
{
public:
    CMMediaOperationRaw();
    virtual ~CMMediaOperationRaw();

    bool isOpened() override;

    int close() override;

    int open(int index) override;

    int readYUV(unsigned char **data) override;
    int readYUV(unsigned char **data, size_t *len) override;
    void readClear() override;

private:
    camera_handle m_camera;
};

#endif  // CUTEDEVICE_CMMEDIAOPERATIONRAW_H
